﻿using System;
using System.Web;
using System.Web.Mvc;

namespace KWatkins.FluentMoqBuilder
{
	public interface IControllerContextBuilder : IBuilder<ControllerContext>
	{
		/// <summary>
		/// Sets the <see cref="ControllerContext.Controller"/> property.
		/// </summary>
		/// <param name="controller">The <see cref="Controller"/>.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithController(Controller controller);

		/// <summary>
		/// Sets the <see cref="ControllerContext.HttpContext"/> property.
		/// </summary>
		/// <param name="httpContext">The <see cref="HttpContextBase"/>.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithHttpContext(HttpContextBase httpContext);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" /> property.
		/// </summary>
		/// <param name="request">The request.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithRequest(HttpRequestBase request);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.Url" />
		/// property.
		/// </summary>
		/// <param name="url">The URL.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithUrl(string url);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.Url" />
		/// property.
		/// </summary>
		/// <param name="url">The URL.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithUrl(Uri url);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.UrlReferrer" />
		/// property.
		/// </summary>
		/// <param name="urlReferrer">The URL referrer.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithUrlReferrer(string urlReferrer);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.UrlReferrer" />
		/// property.
		/// </summary>
		/// <param name="urlReferrer">The URL referrer.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithUrlReferrer(Uri urlReferrer);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.ApplicationPath" />
		/// property.
		/// </summary>
		/// <param name="applicationPath">The application path.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithApplicationPath(string applicationPath);

		/// <summary>
		/// Mocks the <see cref="ControllerContext.HttpContext"/>.<see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.PhysicalApplicationPath" />
		/// property.
		/// </summary>
		/// <param name="physicalApplicationPath">The physical application path.</param>
		/// <returns>The <see cref="IControllerContextBuilder" />.</returns>
		IControllerContextBuilder WithPhysicalApplicationPath(string physicalApplicationPath);
	}
}
